{extend name='common:base'}
{block name="extend_css"}
<meta name="__token__" content="{$Request.token}">
<link rel="stylesheet" type="text/css" href="/bower/bootstrap-table/dist/bootstrap-table.css">
<!--扩展css载入区-->
{/block}
{block name="content"}
<div class="container">
    <div class="table-responsive">
        <div class="layui-btn-group">
            <a class="layui-btn layui-btn-normal  layui-btn-sm" href={:url('auth/group/addC')}>增加</a>
            <button class="layui-btn layui-btn-normal  layui-btn-sm" onclick=deleteMulti("{:url('auth/group/delC')}");>批量删除</button>
        </div>
        <table data-toggle="table" data-sort-name="xh" data-sort-order="asc"  data-pagination="true" id="bt" data-page-size="5"
               data-search="true" data-show-refresh="true" data-show-toggle="true" data-show-columns="true" data-page-list="[3,10,20,'all']">
            <thead>
            <tr>
                <th data-checkbox="true"></th>
                <th data-field="xh" data-sortable="true">序号</th>
                <th data-field="title" data-sortable="true">管理员组</th>
                <th data-field="status" data-sortable="true">状态</th>
                <th data-field="action">操作</th>
            </tr>
            </thead>
            <tbody>
            <!--需要判断data是否存在-->
            {present name="data"}
            {foreach $data as $vo}
            <tr>
                <td></td>
                <td>{$vo.id}</td>
                <td>{$vo.title}</td>
                <td>{if condition ="($vo.status==1)"}是 {else /} 否{/if}</td>
                <td>
                    <div class="btn-group" role="group" aria-label="...">
                        <a type="button" class="btn btn-warning editTag" href={:url('auth/group/assignUser',['id'=>$vo.id])}>设置组权限</a>
                        <a type="button" class="btn btn-info editTag" href={:url('auth/group/editC',['id'=>$vo.id])}>编辑</a>
                        <button type="button" class="btn btn-danger deleteTag" onclick=delOne("{:url('auth/group/delC')}",{$vo.id});>删除</button>
                    </div>
                </td>
            </tr>
            {/foreach}
            {/present}
            </tbody>
        </table>
    </div>
</div>
{/block}
{block name="extend_js"}
<script type="text/javascript" src="/bower/bootstrap-table/dist/bootstrap-table.js"></script>
<script type="text/javascript" src="/bower/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js"></script>
<!--数据导出插件-->
<script type="text/javascript" src="/static/plugins/tableExport/tableExport.js"></script>
<script type="text/javascript" src="/bower/bootstrap-table/dist/extensions/export/bootstrap-table-export.js"></script>
<script type="text/javascript" src="/static/gloabjs/list.js"></script>
<script>
    $('#bt').bootstrapTable({showExport: true,
        exportDataType:"all"});

</script>
{/block}

